'use strict'
module.exports = (obj) => {
  return JSON.stringify(obj, (_, val) => {
      if (Array.isArray(val)) {
        let obj = {}
        val.map((element, i) => {
          obj[(i + 1).toString()] = element
        })
        return obj
      }
      return val
    })
    .replace(/"(\d+)":/g, '[$1]=')
    .replace(/"(\w+)":/g, '$1=')
}
